feat: @speechify/vercel — Speechify provider for the Vercel AI SDK (bridge over @speechify/api) - #1
Merged
Merged
Conversation
Implements the AI SDK SpeechModelV4 specification (generateSpeech, ai@7) against POST /v1/audio/speech. TTS only; the API has no STT endpoint. - createSpeechify / speechify provider factory, SPEECHIFY_API_KEY auth - models: simba-english (default), simba-multilingual, simba-3.0 - outputFormat: simple names (mp3, wav, ...) and codec strings (pcm_16000, ...) - speed implemented via SSML prosody wrap; SSML input passed through - speech marks + billable character count via providerMetadata.speechify - release-please + provenance publish workflow mirroring speechify-api-sdk-typescript
luke-speechify
requested changes
Jul 3, 2026
luke-speechify
left a comment
Collaborator
There was a problem hiding this comment.
lets make sure this follows the naming conventions laid out in the Slack channel. also i'd like this to be a bridge using the @speechify/api package. Zod types are great, but lets map rather than re-invent
…chify/vercel - Replace hand-rolled fetch + zod wire schemas with the official @speechify/api client; the provider now only maps AI SDK call options onto SDK types. - Derive model id / audio format / request types from the SDK (output_format codec strings extended locally until the generated type catches up with the live API). - Convert SpeechifyError to APICallError (retry semantics preserved, user aborts re-thrown as the original AbortError); SDK-internal retries disabled since the AI SDK owns retry policy. - Default base URL now follows the SDK environment (api.speechify.ai). - Rename package to @speechify/vercel per the speechify-ai org naming convention; repository moves to speechify-ai/vercel-sdk.
simba-3.2 is the recommended Simba 3 model in the current API spec (streaming-native, lower TTFB); "simba" is a shared voice in its curated set. simba-3.2 is added to the model id union explicitly since the generated SDK type does not include it yet.
Live /v1/voices check: the simba-3.2 curated set is beatrice_32, dominic_32, edmund_32, geffen_32, harper_32, hugh_32, imogen_32, wyatt_32 (george only supports the 1.6 models). geffen_32 is the en-US voice with the broadest use-case coverage. Live smoke test passes with the defaults.
luke-speechify
approved these changes
Jul 6, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this is
A Speechify TTS provider for the Vercel AI SDK — developers get Speechify speech generation with the same one-line interface as OpenAI / ElevenLabs / Deepgram:
No Speechify provider exists on npm or the AI SDK community providers list today — the slot is open. ElevenLabs and Deepgram are already first-class there.
Architecture
The provider is a thin bridge over the official
@speechify/apiclient — no hand-rolled HTTP or duplicated wire types. It only:text,voice,speed,outputFormat,providerOptions) ontoSpeechify.GetSpeechRequest,SpeechifyError→APICallError(user aborts re-thrown as the originalAbortErrorso AI SDK retry/abort semantics hold),maxRetries: 0) because the AI SDK applies its own retry policy on top.One deliberate extension: the live API accepts codec strings (
pcm_16000,mp3_24000_128,ulaw_8000) viaoutput_format, verified live, but@speechify/api@2.0.0'sGetSpeechRequestdoesn't have the field yet — the type is extended locally until the next SDK generation picks it up. Base URL defaults to the SDK's environment (api.speechify.ai).Naming (per the Slack conventions)
@speechify/vercelSpeechify-AI/vercel-sdk— transferred fromSpeechifyInc/speechify-api-sdk-vercelon 2026-07-06 (GitHub redirects all old URLs).State
Code-complete and tested. Implements the current
SpeechModelV4spec (ai@7) againstPOST /v1/audio/speech. TTS only — the API has no STT endpoint to wrap.npm publish --dry-runcleansimba-3.2, voicegeffen_32: mp3 generated, speech marks + billable count correct, bad-key path raises a cleanAI_APICallError. (Earlier pre-bridge run also live-verified codec output_formatpcm_16000, SSML passthrough, and speed→prosody wrap.) Defaults note: the simba-3.2 curated voice set was pulled live from/v1/voices(8 voices,*_32);geffen_32chosen as the en-US voice with the broadest use-case tags.speechify-api-sdk-typescript: release-please onmaster, pnpm/corepack Node 24, OIDC provenance publish. One fix over the SDK repo:src/version.tscarries thex-release-please-versionannotation so version stamping actually worksDesign notes:
speedis implemented via SSML<prosody>wrap (the API has no speed param); word-timing speech marks are exposed viaproviderMetadata.speechify. Full surface in the README.Remaining steps (permission-gated — @luke-speechify)
Transfer the repo— done 2026-07-06, this is nowSpeechify-AI/vercel-sdk.@speechifyscope rights,pnpm build && npm publish --access public.@speechify/vercel→ Trusted Publisher: repoSpeechify-AI/vercel-sdk, workflowrelease-please.yml. After that, releases are fully automated (merge release-please PR → CI publishes with provenance), same as@speechify/api. Note: repo needs to be flipped public for provenance — it's private pending your review.vercel/aiundercontent/providers/05-community-providers/(copy the structure of41-soniox.mdx, another speech-only provider). Vercel explicitly welcomes these PRs — no approval gate.Questions → Vrishab.